
// SingleNodeSimulatorDlg.h : header file
//

#pragma once
typedef enum {StdDevi,MaxMin,MeanOnly} PLOT_TYPE;
#include "stdafx.h"

// CSingleNodeSimulatorDlg dialog
class CSingleNodeSimulatorDlg : public CDialog
{
// Construction
public:
	CSingleNodeSimulatorDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_SINGLENODESIMULATOR_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	DWORD m_nDataNumber;
	afx_msg void OnBnClickedButtonImportData();
	afx_msg void OnBnClickedButtonRun();
	afx_msg void OnBnClickedButtonGetRes();
	afx_msg void OnBnClickedButtonGetRes2();
	DWORD m_nPivotNumber;
	DWORD m_nStep;
 	DWORD m_nSimpleNumber;
	vector<KEY> m_cKeyVector;
	int m_nMaxDis;
	vector<CCalculator> m_cCalculator[2],m_cCalculator2;
	afx_msg void OnBnClickedRadio1();
	PLOT_TYPE m_nPlotType;
	afx_msg void OnBnClickedRadio2();
	afx_msg void OnBnClickedRadio3();
	afx_msg void OnBnClickedButtonRunKnn();
	DWORD m_nRepeatTimes;
	map<DWORD,vector<KEY>> m_cFinalClustedData;
	vector<KEY> m_cFinalPivotList;
	bool Judge(const DWORD dwIndex,const KEY& cKey,const DWORD dwRange);
	void SortIndex(const KEY& cKey, vector <DWORD> & cSortedIndex);
	int m_nStartK;
	int m_nStopK;
	int m_nDivide;
};
